package com.example.controller;

import com.example.model.pojo.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/article")
public class ArticleController {
    @GetMapping("/list")
    public Result<String> list(/*@RequestHeader(name = "Authorization") String token, HttpServletResponse response*/){
        //前端传token来了验证token
        //有请求头去handers发数据，跟前端不一样反正就也是发数据吧，因为在body没请求头
        //已检查出来是数据都没传过去，看看书
        /*try {
            Map<String, Object> claims = JwtUtil.parseToken(token);
            return Result.success("所有的文章数据....");
        }catch (Exception e){
            response.setStatus(401);
            return Result.error("未登录");
        }*/
        return Result.success("所有的文章数据....");
    }
}
